<div class="easyui-layout" style="width:100%;height:100%;" border="false"  >
	<div region="north" border="false"  >
		<input class="easyui-searchbox" data-options="prompt:'请输入管理员用户名',menu:'#searcher',searcher:doSearch" style="width:300px"></input>
		<div id="searcher" style="width:120px">
			<div data-options="name:'_searcher_lky_admin#name'">管理员</div>
		</div>
	</div>
	<div region="center" border="false"  >
		<table id="log_datagrid" ></table>
	</div>
</div>
<script type="text/javascript">

$(function(){

	
	$('#log_datagrid').datagrid({
		iconCls:'icon-save',
		width:'auto',
		height:'auto',
		nowrap: false,
		fit:true,
		fitColumns:true,
		striped: true,
		url:'${request.contextPath}${namespace?default('')}/mp/auth/log-datagrid.json',
		sortName: 'gmtCreate',
		sortOrder: 'desc',
		remoteSort: true,
		idField:'id',
		columns:[[
					{field:'admin',title:'${action.getDatagridTitle('admin')}',width:80,align:'center',sortable:true,formatter:function(val, rec){
						return rec.admin.name;
					}},
					{field:'logger',title:'${action.getDatagridTitle('logger')}',width:200,align:'center',sortable:true},
					{field:'comments',title:'${action.getDatagridTitle('comments')}',width:200,align:'center',sortable:true},
					{field:'gmtCreate',title:'${action.getDatagridTitle('gmtCreate')}',width:80,align:'center',sortable:true}
				]],
		pagination:true,
		rownumbers:true
	});

});

function doSearch(value,name){
	var queryParams = {};
	if(value){
		queryParams[name] = value;
	}
	$('#log_datagrid').datagrid('options').queryParams = queryParams;
	$('#log_datagrid').datagrid('options').pageNumber = 1;
	// 刷新列表数据
	$('#log_datagrid').datagrid('reload');
}
</script>	